A magnetic random access memory (MRAM) is a type of resistance change memories. As techniques for writing data to an MRAM, there have been known magnetic field writing and spin-transfer torque writing. Among these techniques, the spin-transfer torque writing has advantages in higher integration, lower power consumption, and higher performance because of the property of a spin-transfer torque device that a spin injection current is smaller in an amount for magnetization reversal as magnetic bodies become smaller in size. Furthermore, the magnetic field writing disadvantageously and possibly causes occurrence of erroneous writing of data to unselected memory cells as a result of expansion of the magnetic field. The spin-transfer torque writing, by contrast, does not cause occurrence of such erroneous writing of data to unselected memory cells.
However, the read current is minute in the spin-transfer torque device. To quickly sense the difference between such minute currents, it is necessary to increase the size of transistors constituting sense amplifiers (to improve the current driving capability), thereby suppressing the irregularity in the differential amplification performance of the sense amplifiers. As the transistors become larger in size, the size of each sense amplifier itself becomes larger. Therefore, as the MRAM is further downscaled, it becomes more difficult to arrange each of the sense amplifiers to correspond to paired bit lines. Therefore, with the progress in the downscaling of the MRAM, each of the sense amplifiers may be shared among a plurality of paired bit lines. If each sense amplifier is arranged to correspond to a plurality of bit lines, the number of data (a page size) by which data can be written or read by one access decreases. In this way, the conventional spin-transfer torque MRAM has a problem of lower writing and reading speeds than those of a DRAM, for example.
Furthermore, the MRAM has a problem of inversion of data stored in the memory cells during data retention (a retention defect) although the problem occurs at a low probability and incidentally. The MRAM includes ECC (Error Correction Code) circuits to deal with such a retention defect. The MRAM incorporating the ECC temporarily reads data at the time of a data write operation, updates data in a writing target column to write data, and writes data in the memory cells in the other columns after error correction is conducted on the data (using a write mask). Accordingly, the ECC-incorporated MRAM disadvantageously has not only the problem of the reduction in the operating speed because of the small page size but also the problem of the further reduction in the operating speed because of the read operation and error correction operation performed by the ECC.